Enable the index refresh block#135785
Conversation
|
Pinging @elastic/es-search-foundations (Team:Search Foundations) |
fcofdez
left a comment
There was a problem hiding this comment.
LGTM. I wonder why we need the extra refreshes though.
|
|
||
| - do: | ||
| indices.refresh: | ||
| index: test_nonexistent |
There was a problem hiding this comment.
This test creates an empty index with a mapping and allow_unmapped_fields: false, then immediately searches the index with a non-existent field and expects a 400 error. When run in ServerlessClientYamlTestSuiteIT with the refresh block, the search occurs when the refresh block is still on the index, and the index is skipped, leading to a 200 on 0 shards. Adding this refresh makes the test wait for the block to be gone before making the search call.
Does that make sense? I thought about just blacklisting these tests for Serverless but figured this is a better solution. Curious if you agree...
All changes have been made to skip indices with this block during searches (#129132). This block can now be enabled by default.
Edit: This required adjusting some yml tests. These tests would fail in Serverless as the presence of a refresh block made them skip the index during a search (the intended behavior of a refresh block). We fix this by adding a refresh on each index, which will prevent the test from proceeding until the refresh block is gone.